#!/bin/sh
# Make the output files for each test

# Build our compiler if needed
if [ ! -f ../comp1 ]
then (cd ..; make)
fi

for i in input*c
do if [ ! -f "out.$i" -a ! -f "err.$i" ]
   then
     ../comp1 $i 2> "err.$i"
     # If the err file is empty
     if [ ! -s "err.$i" ]
     then
        rm -f "err.$i"
        cc -o out $i ../lib/printint.c
        ./out > "out.$i"
      fi
   fi
   rm -f out out.s
done
